home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / DELPHI32 / BUTTONS / MOVBUT10 / BUTNCODE.PAS < prev    next >
Pascal/Delphi Source File  |  1996-07-17  |  2KB  |  68 lines

  1. unit Butncode;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls, ExtCtrls, movbut, Buttons;
  8.  
  9. type
  10.   TButtonObject = class(TForm)
  11.     Bevel1: TBevel;
  12.     Label1: TLabel;
  13.     Panel1: TPanel;
  14.     Panel3: TPanel;
  15.     Panel2: TPanel;
  16.     BitBtn1: TBitBtn;
  17.     {MovingButton1: TMovingButton;
  18.     MovingButton2: TMovingButton;
  19.     MovingButton3: TMovingButton;}
  20.     procedure FormCreate(Sender: TObject);
  21.   private
  22.     { Private declarations }
  23.   public
  24.     { Public declarations }
  25.     MovingButton1, MovingButton2, MovingButton3: TMovingButton;
  26.   end;
  27.  
  28. var
  29.   ButtonObject: TButtonObject;
  30.  
  31. implementation
  32.  
  33. {$R *.DFM}
  34.  
  35.  
  36. procedure TButtonObject.FormCreate(Sender: TObject);
  37. begin
  38.  
  39.     { These routines are only necessary if the TMovingButton has not
  40.       been registered with Delphi yet because they manually set up the
  41.       class.  Otherwise, this sample application would not need any code. }
  42.  
  43.     MovingButton1:= TMovingButton.Create(Self);
  44.     MovingButton1.Parent:=Panel1;
  45.     with MovingButton1 do begin
  46.         width:=79;
  47.         height:=29;
  48.         kind:=bkOK;
  49.         MoveInterval:=100;
  50.     end;
  51.     MovingButton2:= TMovingButton.Create(Self);
  52.     MovingButton2.Parent:=Panel2;
  53.     with MovingButton2 do begin
  54.         width:=79;
  55.         height:=29;
  56.         kind:=bkClose;
  57.     end;
  58.     MovingButton3:= TMovingButton.Create(Self);
  59.     MovingButton3.Parent:=Panel3;
  60.     with MovingButton3 do begin
  61.         width:=79;
  62.         height:=29;
  63.         kind:=bkHelp;
  64.     end;
  65. end;
  66.  
  67. end.
  68.